home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 4 / MacMania 4.toast / / Demo's / Igor Demo Pro / 1 PutContentsIn Igor Pro Folder / WaveMetrics Procedures / Image and Contour Plots / Contour Levels < prev    next >
Text File  |  1996-01-29  |  815b  |  19 lines

  1. #include <Keyword-Value>    // For StrByKey
  2.  
  3. | Have you ever wanted to adjust a contour level that Igor
  4. | computed automatically? Ya can't do it!
  5. | You can, however, run this macro which moves all the current
  6. | automatic, manual, or from-wave levels into the More Levels
  7. | Dialog where you CAN adjust a contour level by retyping it.
  8.  
  9. Macro MoveAllLevelsIntoMoreLevels(contourName)
  10.     String contourName
  11.     Prompt contourName,"Contour plot:",popup,ContourNameList("",";")    // plots in top graph
  12.  
  13.     String levels= StrByKey("LEVELS", ContourInfo("",contourName,0))    // levels as string list
  14.     String cmd="ModifyContour "+contourName+" "
  15.     cmd+= "autoLevels = {*,*,0}, moreLevels=0,moreLevels={"+levels+"}"
  16.     Print "All contour levels for "+contourName+" converted to a list of levels in the “More Levels” dialog."
  17.     Execute cmd
  18. End
  19.